<template>
  <div id="deve3">
    <ul>
      <li>
        <div class="deve_none" v-if="none">
          <svg
            t="1602725079979"
            class="icon"
            viewBox="0 0 1024 1024"
            version="1.1"
            xmlns="http://www.w3.org/2000/svg"
            p-id="11482"
            width="100"
            height="120"
          >
            <path
              d="M833.28 289.536l-134.656-134.4a123.648 123.648 0 0 0-88.064-36.608h-345.6a76.8 76.8 0 0 0-76.8 76.8V819.2a76.8 76.8 0 0 0 76.8 76.8h520.192a76.8 76.8 0 0 0 76.8-76.8V358.4a98.816 98.816 0 0 0-28.672-68.864zM810.752 819.2a25.6 25.6 0 0 1-25.6 25.6H264.96a25.6 25.6 0 0 1-25.6-25.6V195.328a25.6 25.6 0 0 1 25.6-25.6h338.688a90.368 90.368 0 0 1 63.744 25.6l116.992 116.992a89.856 89.856 0 0 1 25.6 63.744z"
              p-id="11483"
              fill="#EBEEF5"
            />
            <path
              d="M716.8 574.72H332.8a25.6 25.6 0 0 0 0 51.2h384a25.6 25.6 0 0 0 0-51.2zM716.8 702.72H332.8a25.6 25.6 0 0 0 0 51.2h384a25.6 25.6 0 0 0 0-51.2zM521.216 496.128H332.8a25.6 25.6 0 0 1 0-51.2h188.16a25.6 25.6 0 0 1 0 51.2z"
              p-id="11484"
              fill="#EBEEF5"
            />
          </svg>
          <div class="no_dynamic">
            还没有文章
          </div>
        </div>
        <div>
          <div v-for="usera in useras" :key="usera.tid" >
            <span>{{usera.tTime| time}}发表文章</span>
            <router-link tag='h3' :to="{path:'/Article',query:{aid:usera.tid}}">{{usera.title}}</router-link> 
          </div>
        </div>

      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data(){
      return{
          none:true,
          useras:'',
          ouids:''
      }
  },
  created(){
    this.ouids=this.$store.state.oUid
    // console.log('uid',this.ownuids)
     this.$axios.get('/api/users/usera',{params:{uid:this.ouids}})
                .then(res=>{
                    // console.log('res:',res)
                    this.useras=res.data.data
                    console.log('usreas:',this.useras)
                    if(this.useras.length){
                      console.log(this.useras.length)
                      this.none=!this.none
                    }   
                })
                .catch(err=>{
                    console.log('err:',err)
                })
         
  },
  filters:{
      time:function(value){
         let pTime=[]
        for(let i=0;i<value.length;i++){
          if(value[i]!='T'){
            pTime.push(value[i])
          }else{
            break 
          }
        }
        let pTimes=pTime.join('')
        return pTimes
      }
  }
};
</script>
